package ui.timeline;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;


/**
 * Listener to handle model change events.  This calculates the thumb 
 * locations and repaints the slider if the value change is not caused by
 * dragging a thumb.
 */
public class TwoThumbTimeLineChangeListener implements ChangeListener {
    /**
	 * 
	 */
	private final TwoThumbTimeLineSliderUI timeLineSliderUI;

	/**
	 * @param timeLineSliderUI
	 */
	public TwoThumbTimeLineChangeListener(TwoThumbTimeLineSliderUI timeLineSliderUI) {
		this.timeLineSliderUI = timeLineSliderUI;
	}

	public void stateChanged(ChangeEvent arg0) 
	{
        if (!this.timeLineSliderUI.upperDragging && !this.timeLineSliderUI.currentDragging) {
            //this.timeLineSliderUI.calculateThumbLocation();
            //this.timeLineSliderUI.getSlider().repaint();
        }
    }
}